// This File is part of the "nyaqt" Project
// 
// Copyright  2009 sometmes@gmail.com
// All rights reserved
// 
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.



using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace nyaqt
{
    public class Pre20ProviderFactoriesSection : ConfigurationSection
    {
        [ConfigurationProperty("Pre20Provider", IsDefaultCollection = true)]
        public Pre20ProviderFactoriesElementCollection Pre20Providers
        {
            get
            {
                return base["Pre20Provider"] as Pre20ProviderFactoriesElementCollection;
            }

            set
            {
                base["Pre20Provider"] = value;
            }
        }
    }

    public class Pre20ProviderFactoriesElementCollection : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new Pre20ProviderFactoriesElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return (element as Pre20ProviderFactoriesElement).Name;
        }

        //public Pre20ProviderFactoriesElement this[string invariantName]
        //{
        //    get
        //    {
        //        return this.BaseGet(invariantName) as Pre20ProviderFactoriesElement;
        //    }
        //}
    }

    public class Pre20ProviderFactoriesElement : ConfigurationElement
    {
        [ConfigurationProperty("Name")]
        public string Name
        {
            get
            {
                return base["Name"] as string;
            }
            set
            {
                base["Name"] = value;
            }
        }
        [ConfigurationProperty("Description")]
        public string Description
        {
            get
            {
                return base["Description"] as string;
            }
            set
            {
                base["Description"] = value;
            }
        }
        [ConfigurationProperty("InvariantName")]
        public string InvariantName
        {
            get
            {
                return base["InvariantName"] as string;
            }
            set
            {
                base["InvariantName"] = value;
            }
        }
        [ConfigurationProperty("ConnectionQualifiedName")]
        public string ConnectionQualifiedName
        {
            get
            {
                return base["ConnectionQualifiedName"] as string;
            }
            set
            {
                base["ConnectionQualifiedName"] = value;
            }
        }
        [ConfigurationProperty("CommandQualifiedName")]
        public string CommandQualifiedName
        {
            get
            {
                return base["CommandQualifiedName"] as string;
            }
            set
            {
                base["CommandQualifiedName"] = value;
            }
        }
    }
}
































